package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WfFlowMaster generated by hbm2java
 */
@Entity
@Table(name="wf_flow_master"
    ,catalog="ncsc_erp"
)
public class WfFlowMaster  implements java.io.Serializable {


     private long fmNo;
     private HrEmp hrEmp;
     private String fmCode;
     private String fmDescr;
     private Date fmCreatedDtm;
     private Set<WfFlowMasterLine> wfFlowMasterLines = new HashSet<WfFlowMasterLine>(0);

    public WfFlowMaster() {
    }

	
    public WfFlowMaster(long fmNo) {
        this.fmNo = fmNo;
    }
    public WfFlowMaster(long fmNo, HrEmp hrEmp, String fmCode, String fmDescr, Date fmCreatedDtm, Set<WfFlowMasterLine> wfFlowMasterLines) {
       this.fmNo = fmNo;
       this.hrEmp = hrEmp;
       this.fmCode = fmCode;
       this.fmDescr = fmDescr;
       this.fmCreatedDtm = fmCreatedDtm;
       this.wfFlowMasterLines = wfFlowMasterLines;
    }
   
     @Id 

    
    @Column(name="FM_NO", unique=true, nullable=false)
    public long getFmNo() {
        return this.fmNo;
    }
    
    public void setFmNo(long fmNo) {
        this.fmNo = fmNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="FM_CREATED_BY_EMP_NO")
    public HrEmp getHrEmp() {
        return this.hrEmp;
    }
    
    public void setHrEmp(HrEmp hrEmp) {
        this.hrEmp = hrEmp;
    }

    
    @Column(name="FM_CODE", length=50)
    public String getFmCode() {
        return this.fmCode;
    }
    
    public void setFmCode(String fmCode) {
        this.fmCode = fmCode;
    }

    
    @Column(name="FM_DESCR", length=500)
    public String getFmDescr() {
        return this.fmDescr;
    }
    
    public void setFmDescr(String fmDescr) {
        this.fmDescr = fmDescr;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="FM_CREATED_DTM", length=19)
    public Date getFmCreatedDtm() {
        return this.fmCreatedDtm;
    }
    
    public void setFmCreatedDtm(Date fmCreatedDtm) {
        this.fmCreatedDtm = fmCreatedDtm;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="wfFlowMaster")
    public Set<WfFlowMasterLine> getWfFlowMasterLines() {
        return this.wfFlowMasterLines;
    }
    
    public void setWfFlowMasterLines(Set<WfFlowMasterLine> wfFlowMasterLines) {
        this.wfFlowMasterLines = wfFlowMasterLines;
    }




}


